package com.aloda.controller.user;

import com.aloda.result.Result;
import com.aloda.service.AppCategoryService;
import com.aloda.vo.appCategory.AppCategoryListVO;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController("category-user")
@RequestMapping("/user/category")
public class AppCategoryController {

    @Resource
    private AppCategoryService appCategoryService;

    /**
     * 获取应用分类列表
     * @return
     */
    @GetMapping("/list")
    public Result<List<AppCategoryListVO>> getCategoryList() {
        return Result.success(appCategoryService.getNormalCategoryList());
    }
}
